<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Report_model extends CI_Model {

    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }
    
	function get_count_accomodation($gender){
		return $this->db->query("SELECT count(gender) AS accomodation_count 
								FROM resident_basic_info 
								WHERE gender='".$gender."'");
	}
	
	function get_count_classification($classification,$gender){
		return $this->db->query("SELECT count(classification) AS classification_count 
								FROM resident_basic_info 
								WHERE classification='".$classification."' 
								and gender='".$gender."'");
	}
	
	function get_count_college($college){
		return $this->db->query("SELECT count(college) AS college_count 
								FROM resident_basic_info 
								WHERE college='".$college."'");
	}
	
	function get_count_regional_distribution($region,$gender){
		return $this->db->query("SELECT count(region) AS regional_count 
								FROM resident_basic_info 
								WHERE region='".$region."'
								and gender='".$gender."'");
	}
	
}
/* End of file report_model.php */
/* Location: ./application/models/report_model.php */
?>